package com.example.demo03_mvm.db;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

@Entity(tableName = "good")
public class Goods {
    @PrimaryKey
    private int id;
    private int tid;
    @ColumnInfo
    private String title;
    private double price;
    private String icon;

    public Goods(int id, int tid, String title, double price, String icon) {
        this.id = id;
        this.tid = tid;
        this.title = title;
        this.price = price;
        this.icon = icon;
    }

    public int getTid() {
        return tid;
    }

    public void setTid(int tid) {
        this.tid = tid;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    @Override
    public String toString() {
        return "Goods{" +
                "id=" + id +
                ", tid=" + tid +
                ", title='" + title + '\'' +
                ", price=" + price +
                ", icon='" + icon + '\'' +
                '}';
    }
}
